<%--
  Created by IntelliJ IDEA.
  User: 王旭阳
  Date: 2021/6/15
  Time: 9:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE>
<html>
<head>
    <meta charset="utf-8">
    <title></title>

    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-1"></div>
        <div class="col-md-10">
            <nav class="navbar navbar-default">
                <div class="container-fluid">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="#">学生管理系统</a>
                    </div>

                    <!-- Collect the nav links, forms, and other content for toggling -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            <li><a href="${pageContext.request.contextPath}/allUsers/allUser">用户管理 <span class="sr-only">(current)</span></a></li>
                            <li class="active"><a href="${pageContext.request.contextPath}/stud/allStud">学生管理<span class="sr-only">(current)</span></a></li>
                            <li><a href="${pageContext.request.contextPath}/clazz/allClazz">班级管理<span class="sr-only">(current)</span></a></li>
                            <li><a href="${pageContext.request.contextPath}/grade/allGrade">年级管理<span class="sr-only">(current)</span></a></li>
                        </ul>
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="${pageContext.request.contextPath}/user/goOut" style="font-size: 20px;color: blueviolet">注销</a></li>
                        </ul>
                    </div><!-- /.navbar-collapse -->
                </div><!-- /.container-fluid -->
            </nav>
            <div>
                <h1>
                    <small>学生列表</small>
                </h1>
            </div>
            <div class="row">
                <div class="col-md-4 column">
                    <a class="btn btn-primary" href="${pageContext.request.contextPath}/stud/toAddStud">新增</a>
                </div>
                <div class="col-md-4 column"></div>
                <div class="col-md-4 column">
                    <form class="form-inline" action="${pageContext.request.contextPath}/stud/queryBook" method="post" style="float:right">
                        <span style="color: red;font-weight: bold">${error}</span>
                        <input type="text" name="wxy_username" class="form-control" placeholder="请输入要查询的学生姓名">
                        <input type="submit" value="查询" class="btn btn-primary">
                    </form>

                </div>
            </div>
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>学生编号</th>
                    <th>班级编号</th>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>密码</th>
                    <th>性别</th>
                    <th>照片</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                </thead>

                <tbody>
                <c:forEach var="student" items="${requestScope.get('slist')}">
                    <tr>
                        <td>${student.getWxy_id()}</td>
                        <td>${student.getWxy_classld()}</td>
                        <td>${student.getWxy_sn()}</td>
                        <td>${student.getWxy_username()}</td>
                        <td>${student.getWxy_password()}</td>
                        <td>${student.getWxy_sex()}</td>
                        <td>
                            <img class="media-object" src="..." alt="...">
                        </td>
<%--                        <td>${student.getWxy_photo()}</td>--%>
                        <td>${student.getWxy_remark()}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/stud/toUpdateStud/${student.getWxy_id()}">更改</a> |
                            <a href="${pageContext.request.contextPath}/stud/del/${student.getWxy_id()}" onclick="return confirm('确定将此记录删除?')">删除</a>
                        </td>

                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <a href="#" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li><a href="${pageContext.request.contextPath}/stud/fenye1">1</a></li>
                    <li><a href="${pageContext.request.contextPath}/stud/fenye2">2</a></li>
                    <li><a href="#">3</a></li>
                    <li>
                        <a href="#" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>

        </div>
        <div class="col-md-1"></div>
    </div>

</div>
</body>
</html>
